package com.coder4j.mapper;

import com.coder4j.starter.mybatis.BaseMapper;
import com.coder4j.entity.SControlEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Value;

import java.util.Arrays;
import java.util.List;

/**
 * 任务流程表
 * @author keller
 * @date 2025-03-18 16:22:15
 */
@Mapper
public interface SControlMapper extends BaseMapper<SControlEntity>{
	/**
     * 默认查询条件
     * @return
     */
    @Override
    default List<String> defaultCondition(){
    return Arrays.asList(
            " <if test = 'createId!=null'> AND create_id=#{createId} </if>",
            " <if test = 'updateId!=null'> AND update_id=#{updateId} </if>");
    }

    void putTaskId(@Value("taskFlowId")Integer taskFlowId,@Value("controlId") Integer controlId);

}
